{% extends "base.html" %}  
{% block content %}  
{% for msg in msgs %}
<h1>{{ msg.title}}</h1>
<p>{{ msg.content }}</p>
<p>发表时间：{{ msg.timestamp|date:"Y-m-d H:i" }}</p>
<p>作者：{{ msg.author }}</p>
{% endfor %}

<form method="POST" action="/saveMessage">
    {% csrf_token %}
    标题<input type="text" id="title" name="title"/>
    内容<input type="text" id="content" name="content" />
    昵称<input type="text" id="author" name="author" />
    <input type="submit" value="提交">
</form>
{% endblock %}